<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<h:head>
<h:title>EXCURSION</h:title>

</h:head>

<h:body>


<p:tabMenu activeIndex="2">  
    <p:menuitem value="FLIGHTS" url="http://localhost:8080/TravelDreamWeb/searchFlights.xhtml" icon="ui-icon-search"/>  
    <p:menuitem value="HOTELS" url="http://localhost:8080/TravelDreamWeb/searchHotel.xhtml" icon="ui-icon-search" />  
    <p:menuitem value="EXCURSIONS" url="http://localhost:8080/TravelDreamWeb/searchExcursions.xhtml" icon="ui-icon-search"/>  
</p:tabMenu>  



<h:form>
<h5 style="font-size:large;">EXCURSIONS</h5>
    </h:form>
    
<h:form style="font-size:x-small;">
   <p:dataTable id="dataTable" var="excursions" value="#{searchExcursionBean.excursionsList}" widgetVar="excursionsListTable"   
           emptyMessage="No excursions found with given criteria" filteredValue="#{ssearchExcursionBean.excursionFiltered}" 
           rowKey="#{excursions.idbasicproduct}"
           selection="#{searchExcursionBean.selectedExcursion}"
           selectionMode="single">
           
     
      
          
        <p:column id="EXCURSIONTYPE" filterBy="excursiontype"  
                headerText="EXCURSION TYPE" filterMatchMode="contains" >   
            <h:outputText value="#{excursions.excursiontype}" />  
        </p:column>  
  
       
                
         <p:column id="LOCALITY" filterBy="locality"  
                headerText="Locality"  filterMatchMode="contains">  
            <h:outputText value="#{excursions.locality}" />  
        </p:column>  
         
        
         <p:column id="PRICE" filterBy="price"  
                headerText="PRICE" filterMatchMode="contains">  
            <h:outputText value="#{excursions.locality}" /> 
        </p:column>  
        
        
        
        
          <p:column id="PROVINCE" filterBy="province"  
                headerText="PROVINCE"  filterMatchMode="contains">  
            <h:outputText value="#{excursions.province}" />  
        </p:column>     
        
       
    </p:dataTable>  
       
     <p:dialog header="Operation Result" modal="true" showEffect="fade" hideEffect="fade" widgetVar="dlg" closable="false" >  
        <h:panelGrid columns="2" id="display" update="dataTable">  
                  <h:outputLabel value="operation succeeded, now you can view the selected package in your purchase list" />
           <p:commandButton value="Okay" update="dataTable" onclick="PF('dlg').hide()"/>
        </h:panelGrid>  
    </p:dialog>  
      
 
  <p:commandButton id="dynaButton" value="Actions" type="button"/>
  <p:tieredMenu overlay="true" trigger="dynaButton" my="left top" at="left bottom">
  <p:menuitem value="Purchase" actionListener="#{searchExcursionBean.purchaseExcursion()}" oncomplete="PF('dlg').show()" update="display"/>  
  
   
   
   
  </p:tieredMenu>
          
       
      
      
</h:form>
</h:body>


	
</html>